Skip to content

fix: msg/txn inconsistencies with original SDK#381

Merged
HealthyBuilder merged 1 commit into
solana-foundation:mainfrom
sonicfromnewyoke:sonic/fix-message-bugs
Apr 10, 2026
Merged

fix: msg/txn inconsistencies with original SDK#381
HealthyBuilder merged 1 commit into
solana-foundation:mainfrom
sonicfromnewyoke:sonic/fix-message-bugs

Conversation

@sonicfromnewyoke
Copy link
Copy Markdown
Contributor

Problem

solana-go SDK has several correctness issues and missing features compared to the original Rust's SDK:

  • msg version detection
  • no Sanitize() validation for msgs or txns
  • no HasDuplicates() for detecting duplicate account keys
  • no VerifyWithResults() for per-signature pass/fail diagnostics.

Summary of Changes

  • fixed version detection to use bitmask matching Rust's version prefix
  • added Sanitize, HasDuplicates, VerifyWithResults functions
  • added validation rejecting unsupported message versions during deserialization
  • removed TODO comments
  • removed dead numSignatures < 0 check
  • ported tests from the original SDK

@HealthyBuilder HealthyBuilder merged commit 88a5b52 into solana-foundation:main Apr 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants